#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Script to initialize the database for the simpleBlog application.
"""

import os
import sys

# Add the parent directory to the Python path
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))

from simpleBlog import create_app
from simpleBlog.extensions import db

def init_db():
    """Initialize the database."""
    app = create_app('development')
    with app.app_context():
        db.create_all()
    print("Database initialized successfully.")

if __name__ == '__main__':
    init_db()